﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WeChat.Common;
using BLL;

namespace WeChat.JsSDK.WxPay
{
    public partial class PayResult : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string fail = Request.QueryString["failed"];
                //ApplicationLog.Write("充值结果页面:" + fail);
                //检测是否给当前页面传递了相关参数
                if (string.IsNullOrEmpty(fail))
                {
                    LoginBLL lb = new LoginBLL();
                    if (lb.IsOnline())
                    {
                        Label1.Text = "充值成功";
                    }
                    else
                    {
                        Label1.Text = "预充值成功";
                    }
                    //ApplicationLog.Write("充值结果成功");
                    succeed.Visible = true;
                    failed.Visible = false;
                }
                else
                {
                    //ApplicationLog.Write("充值结果失败");
                    failed.Visible = true;
                    succeed.Visible = false;
                }
            }
        }
    }
}
